import request from '@/utils/request'

// 查询激励语句列表
export function listMotivation(query) {
  return request({
    url: '/manage/motivation/list',
    method: 'get',
    params: query
  })
}

// 查询激励语句详细
export function getMotivation(motivationId) {
  return request({
    url: '/manage/motivation/' + motivationId,
    method: 'get'
  })
}

// 新增激励语句
export function addMotivation(data) {
  return request({
    url: '/manage/motivation',
    method: 'post',
    data: data
  })
}

// 修改激励语句
export function updateMotivation(data) {
  return request({
    url: '/manage/motivation',
    method: 'put',
    data: data
  })
}

// 删除激励语句
export function delMotivation(motivationId) {
  return request({
    url: '/manage/motivation/' + motivationId,
    method: 'delete'
  })
}

// 导出激励语句
export function exportMotivation(query) {
  return request({
    url: '/manage/motivation/export',
    method: 'post',
    params: query,
    responseType: 'blob'
  })
}